import java.util.Scanner;

public class CylinderTest {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入圆的半径：");
        double radius = input.nextDouble();

        System.out.print("请输入圆柱的高：");
        double height = input.nextDouble();

        Circle circle = new Circle(radius);
        Cylinder cylinder = new Cylinder(radius, height);

        System.out.println("圆的面积为：" + circle.area());
        System.out.println("圆柱的表面积为：" + cylinder.surfaceArea());
        System.out.println("圆柱的体积为：" + cylinder.volume());
    }
}

class Shape {
    public double area() {
        return 0;
    }

    public double volume() {
        return 0;
    }

}

class Circle extends Shape {
    private double radius;
    public Circle(double radius) {
    this.radius = radius;
}

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    @Override
    public double area() {
        return Math.PI * radius * radius;
    }
}

class Cylinder extends Circle {
    private double height;
    public Cylinder(double radius, double height) {
    super(radius);
    this.height = height;
}

    public void setHeight(double height) {
        this.height = height;
    }

    public double getHeight() {
        return height;
    }

    public double surfaceArea() {
        return 2 * super.area() + 2 * Math.PI * getRadius() * height;
    }

    @Override
    public double volume() {
        return super.area() * height;
    }
}